var app = getApp()

/**
 * 提现信息列表
 */
function getCashListData(callback) {
  app.func.Get(false, app.api.get_cash_list,
    function (res) {
      typeof callback == "function" && callback(res)
    })
};

/**
 * 兑换接口
 */
function getCashObtaion(params,callback) {
  app.func.Post(false, app.api.get_cash_obtaion, params,
    function (res) {
      typeof callback == "function" && callback(res)
    },
    function(error){
      wx.showToast({
        title: error.data.message,
        icon:'none'
      })
    })
};

/**
 * 请求规则
 */
function getRule(params, callback) {
  app.func.Get(false, app.api.get_setting, params,
    function (res) {
      typeof callback == "function" && callback(res)
    })
};

module.exports = {
  getCashListData: getCashListData,
  getRule: getRule,
  getCashObtaion: getCashObtaion
}